QABitmapNew
You can use theQABitmapNew
function to create a new bitmap.
TQAError QABitmapNew ( const TQAEngine *engine, unsigned long flags, TQAImagePixelType pixelType, const TQAImage *image, TQABitmap **newBitmap);
engine
- A drawing engine.
flags
- A set of bit flags specifying features of the new bitmap. See "Bitmap Flags Masks" (page 1-64) for complete information
pixelType
- The type of pixels in the new bitmap. See "Pixel Types" (page 1-35) for a description of the values you can pass in this parameter.
image
- A pixel image to use for the new bitmap. The
width
andheight
fields of this image can have any values greater than 0.newBitmap
- On entry, the address of a pointer variable. On exit, that variable points to a new bitmap. If a new bitmap cannot be created,
*newBitmap
is set to the valueNULL
.DESCRIPTION
TheQABitmapNew
function returns, through thenewBitmap
parameter, a pointer to a new bitmap associated with the drawing engine specified by theengine
parameter. You can draw the returned bitmap by calling theQADrawBitmap
function.The
flags
parameter specifies a set of bitmap features. If thekQABitmap_Lock
bit in that parameter is set but the drawing engine cannot guarantee that the bitmap will remain locked in memory, theQABitmapNew
function returns an error.SPECIAL CONSIDERATIONS
QABitmapNew
does not automatically copy the pixmap data pointed to by theimages
parameter. As a result, you should not release or reuse the storage occupied by the pixel image until you've calledQABitmapDetach
. Note, however, thatQABitmapNew
does copy all of the information contained in theTQAImage
structure, so you can free or reuse that memory afterQABitmapNew
completes successfully.